#!/usr/bin/env python
# -*- coding: utf-8 -*-

import framework as frame

def sdk_start(sdk):
    sdk.connect_device("ros", "10.10.10.10", 9090)
    sdk.robot.advertise_set_user_mode.set(3)
    sdk.robot.advertise_set_ground_model.set(4)
    sdk.robot.action.set(3)
    while True:
        sdk.robot.subscribe_version.subscribe()
        if sdk.robot.subscribe_version.message:
            print(sdk.robot.subscribe_version.message["motion_control"])
        sdk.utils.time.sleep(1)

if __name__ == '__main__':
    sdk = frame.Init()
    sdk_start(sdk)